"use strict";

var _ = require('underscore'),
    Misc = require('./utils/misc.js');

/**
 * @module Common
 * @summary Common utilities
 */
module.exports = _.extend(Misc,
{
    /**
     * @member {underscore}
     */
    _: _,

    /**
     * @member {async}
     */
    async: require('async'),

    /**
     * @member {fs}
     */
    fs: require('fs-extra'),

    /**
     * @member {string}
     */
    S: require('string'),

    /**
     * The base util object used to build better js OO-class
     * @member {object}
     */
    Base: require('./utils/base.js'),

    /**
     * The HTTP status code table
     * @member {module:HttpCode}
     */
    HttpCode: require('./utils/httpcode.js'),

    /**
     * Commonly used regex patterns
     * @member {module:Pattern}
     */
    Pattern: require('./utils/pattern.js'),

    Error: require('./utils/error.js'),

    /**
     * Commonly used helpers
     * @member {module:Helpers}
     */
    H: require('./helpers.js')
});

/**
 * Completion callback
 *
 * @callback completionCallback
 * @param {*} [err] - Error if any
 * @param {*} [object] - Result
 */

